*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

html {
     font-size: 62.5%; /*这个设置的值也是10px*/
    /* font-size: 10px; */
}

body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    /* font-size: 16px; */
    line-height: 1.7;
    color: #777;
    padding: 3rem;
    box-sizing: border-box; /*这个设置会保证当前的尺寸就是元素的最终尺寸，不会因为设置了padding或者margin而改变尺寸*/
}

.header {
    height:95vh;
    background-image: 
        linear-gradient(to right bottom,rgba(128, 214, 113, 0.8),rgba(39, 180, 133, 0.8)),
        url(../img/hero.jpg);  /*两个背景叠加的效果*/
    background-size: cover;
    background-position: top;
    clip-path: polygon(0 0,100% 0,100% 75%,0 100%);  /*裁剪路径 除了比例还可以写具体的长度：500px*/
    position: relative;
}

.logo-box {
    position: absolute;
    top: 4rem;
    left: 4rem;
}

.logo {
    height: 3.5rem;
}

/* .logo:hover {
    animation: moveInLeft 2s ease-out;
} */

.text-box {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.heading-primary {
    color: white;
    text-transform: uppercase;

    backface-visibility: hidden; /*解决动画中乱动的问题*/
    margin-bottom: 6rem;
}

.heading-primary-main{
    display: block;
    font-size: 6rem;
    font-weight: 400;
    letter-spacing: 3.5rem;

    animation-name: moveInLeft;
    animation-duration: 1s;
    animation-timing-function: ease-out;
    /*animation-delay: 2s;*/
    /*animation-iteration-count: 2;*/
}

.heading-primary-sub{
    display: block;
    font-size: 2rem;
    letter-spacing: 1.7rem;

    /* animation-name: moveInRight;
    animation-duration: 2s;
    animation-timing-function: ease-out; */

    animation: moveInRight 1s ease-out;
}

@keyframes moveInLeft {
    0%{
        opacity: 0; /*可见性*/
        transform: translateX(-10rem);
        /* transform: rotate(-10deg); */
    }

    80%{
        transform: translateX(2rem);
    }

    100%{
        opacity: 1;
        transform: translate(0);
    }
}

@keyframes moveInRight {
    0%{
        opacity: 0; 
        transform: translateX(10rem);
    }

    80%{
        transform: translateX(-2rem);
    }

    100%{
        opacity: 1;
        transform: translate(0);
    }
}

.btn:link,
.btn:visited {
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.5rem 4rem;
    display: inline-block;
    border-radius: 10rem;
    transition: all .2s; /*设置所有移动的时间*/
    position: relative;
    font-size: 1.6rem;
}

.btn:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(-0.1rem);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
}

.btn-white {
    background: #fff;
    color: #777;
}

.btn::after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    border-radius: 10rem;
    position: absolute; 
    top: 0;
    right: 0;
    z-index: -1;
    transition: all .2s;
}

.btn-white::after {
    background: #fff;
}

.btn:hover::after {
    /* transform: scaleX(1.4) scaleY(1.6); */
    /* opacity: 0; */
     animation: identifier 0.2s ease-in;  /*不使用动画使用上面的配置也能达到相同的效果 */
}

.btn-animated {
    animation: showFromDismiss 1s ease-in 0.75s;
    animation-fill-mode:backwards;  /*由于动画是延迟执行的，所以一开始按钮就会显示，这是需要设置这个属性使得按钮不可见*/
}

@keyframes identifier {
    0% {
        opacity: 1;
        transform: scaleX(1) scaleY(1);
    }

    100% {
        opacity: 0;
        transform: scaleX(1.4) scaleY(1.6);
    }
}

@keyframes showFromDismiss {
    0% {
        opacity: 0;
        scale: 0.8;
    }
    80% {
        scale: 1.1;
    }
    100% {
        opacity: 1;
        scale: 1;
    }
}